﻿<UserControl x:Class="SampleApp.Samples.TextBoxView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" d:DesignHeight="300" 
             xmlns:toms="urn:TomsToolbox">
  <DockPanel>
    <toms:TextBoxVisibleWhiteSpaceDecorator Width="300" DockPanel.Dock="Left" WhiteSpaces="All" WhiteSpaceColor="{Binding Foreground, ElementName=TextBox}" WhiteSpaceOpacity=".3">
      <TextBox x:Name="TextBox" Text="Demo of white space&#10;visualization with the TextBoxVisibleWhiteSpaceDecorator adorner decorator&#10;&#9;- Spaces&#10;&#9;- Tabs&#10;&#9;- Paragraphs&#10;&#10;Type here to try..."
               TextWrapping="Wrap" AcceptsTab="True" AcceptsReturn="True" FontSize="20" Foreground="DarkBlue"/>
    </toms:TextBoxVisibleWhiteSpaceDecorator>
    <TextBlock Margin="10" Text="A demo of the TextBoxVisibleWhiteSpaceDecorator" TextWrapping="Wrap"/>
  </DockPanel>
</UserControl>